<template>
	<view class="ys">
		<uni-section title="报警房间" type="line" linebg="#ff9466">
			<uni-data-select v-model="value" :localdata="range"></uni-data-select>
		</uni-section>
		<uni-section title="报警简介" type="line" linebg="#ff9466">
			<uni-easyinput type="textarea" autoHeight v-model="content" placeholder="请输入内容(选填)"></uni-easyinput>
		</uni-section>
		<button :loading="loading" :disabled="loading" @click="personalAlert" class="btn">一键报警</button>
	</view>
</template>

<script>
	import {
		personalAlert
	} from "@/api/api.js"
	export default {
		data() {
			return {
				value: '',
				range: [],
				content: '',
				loading: false
			}
		},
		onLoad() {

		},
		methods: {
			personalAlert() {
				personalAlert({
					alertContent: this.content,
					houseId: this.value
				}).then(res => {

				})
			}
		}
	}
</script>

<style lang="scss">
	.ys {
		padding: 10px;
		box-sizing: border-box;
	}

	.btn {
		margin-top: 20px;
		background: #ff9466;
		color: #fff;
		font-size: 14px;
	}

	.decoration {
		background-color: #ff9466;
	}
</style>